<template>
	<view class="page">
		 <view class="list">
			 <view class="title" v-if="list.length==0">
			 	暂无数据
			 </view>
		 	<view class="itemlist" v-for="item in list " :key="item.id">
		 		<view class="topline">
		 			<view class="name">
		 				{{item.hospitalDoctor.dName}} {{item.packageType==0?'会员服务':'专病服务'}}
		 			</view>
					<view class="price">
						￥{{item.payPrice}}
					</view>
		 		</view>
				<view class="typeline">
						<view class="type">
							类型：{{item.packageName}}
						</view>
						<view class="date">
							日期：{{item.payTime}}
						</view>
				
				</view>
		 	</view>
		 </view>
	</view>
</template>

<script>
	import {orderManage} from '../../utils/api.js'
	export default {
		data() {
			return {
			  list:[]
			}
		},
		onShow() {
			let p={
				phone:uni.getStorageSync('phone'),
			}
			orderManage(p).then(res=>{
				console.log(res,'订单列表')
				this.list=res.data.data.filter(item => item.payStatus !== 0)
			})
		},
		methods: {
			
		}
	}
</script>

<style lang="less" scoped>
   .page{
	   width: 750rpx;
	   box-sizing: border-box;
	   .list{
		   width: 100%;
		   .title{
			   text-align: center;
			   margin-top: 20rpx;
			   color: gray;
		   }
		   .itemlist{
			   width: 100%;
			   padding: 10rpx 0;
			   background: white;
			   margin-bottom: 10rpx;
			   box-sizing: border-box;
			   .topline{
				   width: 100%;
				   display: flex;
				   align-self: center;
				   padding: 10rpx 20rpx;
				   border-bottom: 1rpx solid #f1f1f1;
				   font-size: 30rpx;
				   font-weight: bold;
				   justify-content: space-between;
				   box-sizing: border-box;
			   }
			   .typeline{
				   width: 100%;
				   display: flex;
				   align-self: center;
				   padding: 10rpx 20rpx;
				   font-size: 30rpx;
				   font-weight: bold;
				   color: gray;
				   box-sizing: border-box;
				   justify-content: space-between;
			   }
		   }
	   }
   }
</style>
